package com.lifesting.front;

import javax.faces.component.UIComponent;
import javax.faces.event.FacesEvent;
import javax.faces.event.FacesListener;

import com.lifesting.front.Table.FilterListener;

/**
 * Filter 事件，每次只能Filter一列
 * @author david
 *
 */
public class FilterEvent extends FacesEvent {
	private static final long serialVersionUID = -6513594862064721179L;
	//filter的列
	private final String filterField;
	//like '%xxx%'
	private final String filterLike;
	public String getFilterField() {
		return filterField;
	}
	public String getFilterLike() {
		return filterLike;
	}
	public FilterEvent(UIComponent component, String filterField,
			String filterLike) {
		super(component);
		this.filterField = filterField;
		this.filterLike = filterLike;
	}
	@Override
	public boolean isAppropriateListener(FacesListener listener) {
		return (listener instanceof FilterListener);
	}
	@Override
	public void processListener(FacesListener listener) {

	}

}
